﻿using Newtonsoft.Json;

namespace Discord.Param;

/// <summary>
/// 发送图片调用参数
/// </summary>
public class SendAttachmentParam
{
    [JsonProperty(PropertyName = "content")]
    public string Content { get; set; } = "";

    [JsonProperty(PropertyName = "nonce")]
    public string Nonce { get; set; } = "";

    [JsonProperty(PropertyName = "channel_id")]
    public string ChannelId { get; set; } = "";

    [JsonProperty(PropertyName = "type")]
    public int Type { get; set; }

    [JsonProperty(PropertyName = "sticker_ids")]
    public List<string> StickerIds { get; set; } = new();

    [JsonProperty(PropertyName = "attachments")]
    public List<SendUploadInfo> AttachmentList { get; set; } = new();
}

public class SendUploadInfo
{
    /// <summary>
    /// 文件名
    /// </summary>
    [JsonProperty(PropertyName = "filename")]
    public string FileName { get; set; } = "";

    /// <summary>
    /// 上传文件名
    /// </summary>
    [JsonProperty(PropertyName = "uploaded_filename")]
    public string UploadedFileName { get; set; } = "";

    /// <summary>
    /// 文件大小
    /// </summary>
    [JsonProperty(PropertyName = "id")]
    public string Id { get; set; } = "0";
}